<?php
// 景点ajax控制器
class Controller_WWW_Scenicspotajax extends Controller{

    public function __construct ($req, $res)
    {
     parent::__construct($req, $res);
    }

    public function action_ajax_getTypesByCity ()
    {
    	$post = $this->request->post();
    	$city=Arr::get($post, 'city');
        $types=App_Scenictype::getTypeListByCityId($city);
        //排除自定义景点
        foreach ($types as $k => $v)
        {
            if($k==2)
              unset($types[$k]);
        }
        echo json_encode($types);exit();
    }
}
